GdkDisplayDeviceHooks
gdk_display_set_device_hooks
gdk_display_warp_pointer
-gdk_display_warp_device
gdk_display_supports_cursor_color
gdk_display_supports_cursor_alpha
gdk_display_get_default_cursor_size
gdk_device_get_has_cursor
gdk_device_get_n_axes
gdk_device_get_n_keys
+gdk_device_warp
<SUBSECTION>
gdk_device_grab
gdk_device_set_source
gdk_device_type_get_type G_GNUC_CONST
gdk_device_ungrab
+gdk_device_warp
gdk_disable_multidevice
gdk_display_add_client_message_filter
gdk_display_beep
gdk_display_supports_selection_notification
gdk_display_supports_shapes
gdk_display_sync
-gdk_display_warp_device
gdk_display_warp_pointer
gdk_drag_abort
gdk_drag_action_get_type G_GNUC_CONST
GDK_DEVICE_GET_CLASS (device)->ungrab (device, time_);
}
+/**
+ * gdk_device_warp:
+ * @device: the device to warp.
+ * @screen: the screen to warp @device to.
+ * @x: the X coordinate of the destination.
+ * @y: the Y coordinate of the destination.
+ *
+ * Warps @device in @display to the point @x,@y on
+ * the screen @screen, unless the device is confined
+ * to a window by a grab, in which case it will be moved
+ * as far as allowed by the grab. Warping the pointer
+ * creates events as if the user had moved the mouse
+ * instantaneously to the destination.
+ *
+ * Note that the pointer should normally be under the
+ * control of the user. This function was added to cover
+ * some rare use cases like keyboard navigation support
+ * for the color picker in the #GtkColorSelectionDialog.
+ *
+ * Since: 3.0
+ **/
+void
+gdk_device_warp (GdkDevice *device,
+ GdkScreen *screen,
+ gint x,
+ gint y)
+{
+ g_return_if_fail (GDK_IS_DEVICE (device));
+ g_return_if_fail (GDK_IS_SCREEN (screen));
+ g_return_if_fail (gdk_device_get_display (device) == gdk_screen_get_display (screen));
+
+ GDK_DEVICE_GET_CLASS (device)->warp (device, screen, x, y);
+}
+
/* Private API */
void
_gdk_device_reset_axes (GdkDevice *device)
void gdk_device_ungrab (GdkDevice *device,
guint32 time_);
+void gdk_device_warp (GdkDevice *device,
+ GdkScreen *screen,
+ gint x,
+ gint y);
+
gboolean gdk_device_grab_info_libgtk_only (GdkDisplay *display,
GdkDevice *device,
GdkWindow **grab_window,
*
* Since: 2.8
*
- * Deprecated: 3.0: Use gdk_display_warp_device() instead.
+ * Deprecated: 3.0: Use gdk_device_warp() instead.
*/
void
gdk_display_warp_pointer (GdkDisplay *display,
gint x,
gint y)
{
- gdk_display_warp_device (display,
- display->core_pointer,
- screen,
- x, y);
-}
-
-/**
- * gdk_display_warp_device:
- * @display: a #GdkDisplay.
- * @device: a #GdkDevice.
- * @screen: the screen of @display to warp @device to.
- * @x: the X coordinate of the destination.
- * @y: the Y coordinate of the destination.
- *
- * Warps @device in @display to the point @x,@y on
- * the screen @screen, unless the device is confined
- * to a window by a grab, in which case it will be moved
- * as far as allowed by the grab. Warping the pointer
- * creates events as if the user had moved the mouse
- * instantaneously to the destination.
- *
- * Note that the pointer should normally be under the
- * control of the user. This function was added to cover
- * some rare use cases like keyboard navigation support
- * for the color picker in the #GtkColorSelectionDialog.
- *
- * Since: 3.0
- **/
-void
-gdk_display_warp_device (GdkDisplay *display,
- GdkDevice *device,
- GdkScreen *screen,
- gint x,
- gint y)
-{
- g_return_if_fail (GDK_IS_DISPLAY (display));
- g_return_if_fail (GDK_IS_DEVICE (device));
- g_return_if_fail (GDK_IS_SCREEN (screen));
- g_return_if_fail (display == gdk_device_get_display (device));
-
- GDK_DEVICE_GET_CLASS (device)->warp (device, screen, x, y);
+ gdk_device_warp (display->core_pointer,
+ screen,
+ x, y);
}
gulong
GdkDevice *device,
gint *win_x,
gint *win_y);
-void gdk_display_warp_device (GdkDisplay *display,
- GdkDevice *device,
- GdkScreen *screen,
- gint x,
- gint y);
#ifndef GDK_MULTIDEVICE_SAFE
GdkDisplayPointerHooks *gdk_display_set_pointer_hooks (GdkDisplay *display,
return FALSE;
}
- gdk_display_warp_device (display, pointer_device, screen, x + dx, y + dy);
+ gdk_device_warp (pointer_device, screen, x + dx, y + dy);
return TRUE;
{
info->cur_x += dx;
info->cur_y += dy;
- gdk_display_warp_device (gtk_widget_get_display (widget), pointer,
- gtk_widget_get_screen (widget),
- info->cur_x, info->cur_y);
+ gdk_device_warp (pointer,
+ gtk_widget_get_screen (widget),
+ info->cur_x, info->cur_y);
}
gtk_drag_update (info, info->cur_screen, info->cur_x, info->cur_y, (GdkEvent *)event);